﻿@using Kugar.UI.Web.AdminLTE.Enums
@using Kugar.UI.Web.AdminLTE.Helpers
@using Kugar.UI.Web.AdminLTE.Helpers.FormExtMethod
@using Kugar.UI.Web.AdminLTE.PageControls.PageForms
@using Kugar.UI.Web.AdminLTE.PageControls;
@using Kugar.UI.Web.AdminLTE.PageControls.Helpers.ButtonExtMethod

@{
    Layout = null;
}

@using (WebUI.Control.ModalWindow().ID("ModalWindow").Title("ModalWindow")
.ContentWidth(800).ContentHeight(600)
.AddRightButton(x => x.Text("save").Type(ButtonTypeEnum.submit).Color(ColorPaletteEnum.success))
.AddRightButton(x => x.Text("cancel").Type(ButtonTypeEnum.button).Color(ColorPaletteEnum.@default))
.Render())
{
    using (var form = WebUI.Control.Form().Post().UpdateElementID("ModalWindow").DefaultControlWidth("65%").Render())
    {
        @form.AddTextBox().Label("txt").Value("ttttttttttttt").Name("modalTxt").Tips("devil").Required().Render()

        @form.AddLabel().Label("Label").Value("llllllll").Tips("devil.....").Render()

        @form.AddImageUpload().UploadUrl("/Home/UploadFile").ControlWidth("").Label("imageupload").Src("d").Name("img").Size(100, 100).Render()

        @form.AddImageUpload().UploadUrl("/Home/UploadFile").ControlWidth("").Label("imageupload").Src("d").Name("img").Size(200, 100).Render()

        @form.AddImageUpload().UploadUrl("/Home/UploadFile").ControlWidth("").Label("imageupload").Src("").Name("img").Size(100, 100).Render()

        @form.AddImageUpload().UploadUrl("/Home/UploadFile").ControlWidth("").Label("imageupload").Src("").Name("img").Size(200, 100).Render()

        using (form.AddCustomContainer().Label("Container").ControlWidth("100%").Render())
        {
            using (var tb = WebUI.Control.Table<object>().Data(new object[0]).Type(DataTableTypeEnum.WebUITable).FillRowCount(3).NoWrap().Render())
            {
                @tb.Columns.AddCheckbox().ColumnTitle("Checkbox").Checked(x => true).Name(x => "cc").Value(x => tb.CurrentRowIndex.ToString())
                
                @tb.Columns.AddLabel().ColumnTitle("Label").Value(x => "Label")

                @tb.Columns.AddLabel().ColumnTitle("Label").Value(x => "Label")

                @tb.Columns.AddLabel().ColumnTitle("Label").Value(x => "Label")

                @tb.Columns.AddLabel().ColumnTitle("Label").Value(x => "Label")

                @tb.Columns.AddLabel().ColumnTitle("Label").Value(x => "Label")

                @tb.Columns.AddTextbox().ColumnTitle("Textbox").Value(x => "Textbox").Name(x => "tt")

                @tb.Columns.AddSelector().ColumnTitle("Selector").CurrentValue(x => "0").Name(x => "ss").FirstItem(new SelectorItem("select", "-1")).Options(new[] { new SelectorItem("s0", "0"), new SelectorItem("s1", "1"), })
            }
        }

        @*@form.AddSummerNote().Label("SummerNote").ControlWidth("100%").UploadUrl("/Home/UploadFile").Height("200px").Name("sum").Render()*@

    }
}